﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nest;

namespace ES.Client.Demo
{
    [ElasticsearchType(Name = "JoinUser", IdProperty = "")]
    public class JoinUser
    {
        public JoinUser()
        {
            JoinHistories = new List<JoinHistory>();
        }

        public long UserId { get; set; }

        [Nest.String(Index = Nest.FieldIndexOption.NotAnalyzed)]
        public string UserName { get; set; }

        [Nest.Nested(IncludeInAll = true)]
        public List<JoinHistory> JoinHistories { get; set; }
    }


    public class JoinHistory
    {
        public long EventId { get; set; }

        public DateTime JoinTime { get; set; }

        public bool Signed { get; set; }
    }
}
